From: Giovanni Campagna Date: Wed, 23 Mar 2011 20:37:05 +0000 (+0100) Subject: NotificationDaemon: fix typo in dealing with TrayIcon X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~8501 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=953004886756e6e68b272d576eac608476ef8cdc;p=gnome-shell.git NotificationDaemon: fix typo in dealing with TrayIcon Source was failing to determine if it was a tray icon, destroying itself when the associated application was closed. https://bugzilla.gnome.org/show_bug.cgi?id=645625 --- diff --git a/js/ui/notificationDaemon.js b/js/ui/notificationDaemon.js index f8f356e8a..c3ae212ac 100644 --- a/js/ui/notificationDaemon.js +++ b/js/ui/notificationDaemon.js @@ -519,10 +519,13 @@ Source.prototype = { _appStateChanged: function() { // Destroy notification sources when their apps exit. // The app exiting would normally result in a tray icon being removed, - // so it should be ok to destroy the source associated with a tray icon - // here too, however we just let that happen through the code path - // associated with the tray icon being removed. - if (!this._isTrayIcon && this.app.get_state() == Shell.AppState.STOPPED) + // so the associated source would be destroyed through the code path + // that handles the tray icon being removed. We should not destroy + // the source associated with a tray icon when the application state + // is Shell.AppState.STOPPED because running applications that have + // no open windows would also have that state. This is often the case + // for applications that use tray icons. + if (!this._trayIcon && this.app.get_state() == Shell.AppState.STOPPED) this.destroy(); },